package com.weitu.permission.user.entity;

import java.io.Serializable;

/**
 * Table: SYS_USER_DUTY
 */
public class UserDuty implements Serializable {
    /**
     * Column: SYS_USER_DUTY.deptId
     */
    private String deptId;

    /**
     * Column: SYS_USER_DUTY.userId
     */
    private String userId;

    /**
     * Column: SYS_USER_DUTY.dutyId
     */
    private String dutyId;

    private String dutyName;

    private static final long serialVersionUID = 1L;

    public UserDuty() {
    }

    public UserDuty(String deptId, String userId, String dutyId) {
        this.deptId = deptId;
        this.userId = userId;
        this.dutyId = dutyId;
    }

    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId == null ? null : deptId.trim();
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId == null ? null : userId.trim();
    }

    public String getDutyId() {
        return dutyId;
    }

    public void setDutyId(String dutyId) {
        this.dutyId = dutyId == null ? null : dutyId.trim();
    }

    public String getDutyName() {
        return dutyName;
    }

    public void setDutyName(String dutyName) {
        this.dutyName = dutyName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        UserDuty userDuty = (UserDuty) o;

        if (deptId != null ? !deptId.equals(userDuty.deptId) : userDuty.deptId != null) return false;
        if (userId != null ? !userId.equals(userDuty.userId) : userDuty.userId != null) return false;
        if (dutyId != null ? !dutyId.equals(userDuty.dutyId) : userDuty.dutyId != null) return false;
        return dutyName != null ? dutyName.equals(userDuty.dutyName) : userDuty.dutyName == null;
    }

    @Override
    public int hashCode() {
        int result = deptId != null ? deptId.hashCode() : 0;
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (dutyId != null ? dutyId.hashCode() : 0);
        result = 31 * result + (dutyName != null ? dutyName.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("UserDuty{");
        sb.append("deptId='").append(deptId).append('\'');
        sb.append(", userId='").append(userId).append('\'');
        sb.append(", dutyId='").append(dutyId).append('\'');
        sb.append(", dutyName='").append(dutyName).append('\'');
        sb.append('}');
        return sb.toString();
    }
}